#ifndef TIME_H
#define TIME_H

#include "defines.h"
#include <chrono>

typedef std::chrono::high_resolution_clock::time_point time_point;

class Clock
{
public:
    Clock();
    static time_point now();      // return current time
    static uint64 toMilli(chrono::high_resolution_clock::duration duration); // convert difference of two time_points to milliseconds
    static uint64 toMicro(chrono::high_resolution_clock::duration duration);
    static uint64 toNano(chrono::high_resolution_clock::duration duration);

    static uint64 durationMilli(time_point start, time_point finish);
    static uint64 durationMicro(time_point start, time_point finish);
    static uint64 durationNano(time_point start, time_point finish);
};

#endif // TIME_H
